/*
 * TriggerArea.hpp
 *
 *  Created on: Sep 15, 2013
 *      Author: Jason Ashbach
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef TRIGGERAREA_HPP_
#define TRIGGERAREA_HPP_

#include <SFML/Graphics.hpp>

namespace OForce_Mode {

class TriggerArea {
public:
	TriggerArea(float left, float top, float width, float height);
	~TriggerArea() {}
	void update();
	bool isInArea() {return entered;}
	bool enteredArea() {return (entered && !wasInPreviously);}
	sf::FloatRect getRect() {return mRect;}
private:
	bool entered;
	bool wasInPreviously;
	sf::FloatRect mRect;
};

} // namespace

#endif /* TRIGGERAREA_HPP_ */
